JFRewards Indi Channel <Heikin> v4.0<>
SOP guidelines only given to JF members .
The ideas are:
1) Finding where to enter position of buying and sell.
2) Finding where is the realistic take profit target within 24 hours with maximum profits.
3) Finding Trailing STOP LOSS, Trailing Take Profit, Take Profit, STOP LOSS.
Fully tested with @Binance Exchanger with numerous of stablecoins and altcoins as well as BTC , ETH.
Performance cannot be shown due to non standard chart of Heikin Ashi.
Komut dosyalarını "stop loss" için ara
Buy the Dips (by Coinrule)Taking your first steps into automated trading may be challenging. Coinrule's mission is to make it as easy as possible, also for beginners.
Here follows the best trading strategy to get started with Coinrule. This strategy doesn't involve complex indicators, yet was proved to be effective in the long term for many coins. Results seem to be improved when trading a coin vs Bitcoin.
The strategy buys the dips of a coin to sell with a profit. A stop-loss protects every trade.
Crypto markets offer high volatility and, thus, excellent opportunities for trading. Excluding times of severe downtrend, buying the dip is a simple and effective long-term trading strategy. The buy-signal is set to a 2% drop in a 30-minutes time frame.
Each trade comes with a take profit and a stop loss. Both set at 2%.
You can adjust these percentages to the market volatility as an advanced setup. You can backtest the outcomes using the backtesting tool from Tradingview
The strategy assumes each order to trade 30% of the available capital. A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange.
TrendMaAlignmentStrategy - Long term tradesThis is another strategy based on moving average alignment and HighLow periods. This is more suitable for long term trend traders and mainly for stocks.
Candle is colored lime if : Lookback Period has at least one bar with moving averages fully aligned OR None of the bars in Lookback periods has negatively aligned moving averages (More than half are positively aligned).
Candle is colored orange if : Lookback Period has at least one bar with moving averages fully aligned in negative way OR none of the bars in lookback has positively aligned moving averages (More than half are negatively aligned).
If either of above conditions are met, candle is colored silver.
Moving average alignment parameters:
Moving Average Type : MA Type for calculating Aligned Moving Average Index
Lookback Period : Lookback period to check highest and lowest Moving Average index.
HighLow parameters:
Short High/Low Period: Short period to check highs and lows
Long High/Low Period: Longer Period to check highs and lows.
If short period high == long period high, which means, instrument has made new high in the short period.
ATR Parameters:
ATR Length: ATR periods
StopMultiplyer: To set stop loss.
ReentryStopMultiplyer: This is used when signal is green buy stop loss on previous trade is hit. In such cases, new order will not be placed until it has certain distance from stop line.
Trade Prameters:
Exit on Signal : To be used with caution. Enabling it will allow us to get out on bad trades early and helps exit trades in long consolidation periods. But, this may also cause early exit in the trend. If instrument is trending nicely, it is better to keep this setting unchecked.
Trade direction : Default is long only. Short trades are not so successful in backtest. Use it with caution.
Backtest years : limit backtesting to certain years.
Part of the logic used from study's below:
Other strategies based on these two studies are below (which are meant for short - medium terms):
2 Candles Inside ATR2 agitated candles falling inside ATR range, awaiting possibly a big move.
Buy / Sell signals at combined high / low can be used as order with other as stop loss.
Counter trade, when this minimal stop loss is hit, is also as useful. However, wait till the SL candle closes, before opening position on the other side.
Works quite well on 15 mins chart, with settings of ATR duration 25 and multiplier 0.6. These settings are configurable, so feel free.
[HTI2] Hiubris Trend Indicator 2 StrategyThis is the Strategy version of the HTI2 Indicator
After testing several strategies for months and comparing them to the standard 'Buy and Hold' method, we've found the best performing strategy for BTCUSDT
We simplified it to make it more user-friendly (We've only added 1 optional exit: a % SL) and left all the inputs adjustable, so it can be optimized for ANY pair!
This is a Trend Indicator! This means that the '% Profitable Trades' is not the main focus, but catching every trend swing. When trying to catch every trend swing, naturally alot of the them might be unprofitable, especially in sideways markets. The idea behind this strategy is to catch all the significant trend movements, which are alot more profitable than all the 'sideway market' losses
For that reason, we recomment backtesting on Timeframes greater than 15min. Initially we suggest you backtest without a Stop-Loss, trying multiple combinations of the 2 inputs (Length 9 to 32 / Multiplier 2 to 12)
After you found a profitable enough combination, you should look at the 'Average Losing Trade' and the 'Largest Losing Trade', then try further improving the results by setting up a Stop-Loss accordingly (if needed)
In our case, we've found that having a 2% SL (on BTCUSDT) really helps alot with those sideways market trend swings. This also allows us to comfortably us a 10x leverage
*** When using the Re-Entry feature, make sure to change the order size to contracts! Do not leave is as '% of Account' !!! ***
Some of our backtesting results
BTCUSDT 30-5 30min, 2% SL vs 'Buy and Hold'
2019 - present 697.42% vs 250%
2018 - 2019 119.42% vs -75%
EURUSD 18-6 30min, 0.6% SL
2019 - present 12.4%
AMZN 13-2 30min, 2% SL
2019- present 279.44%
XAUUSD 18-3 30min, 1.75% SL
2019- present 53.43%
BA 20-6 30min, 1.5% SL
2019- present 251.35%
Lowkey System (Strategy)View study version
A long-only strategy that aim to detect the beginning of new bullish trends and their ends.
For entering a new position this script is waiting for a moving average crossover then wait for a volume increase relative to the current volatility.
For closing a position it's simply waiting for a crossunder of whether the MA or if enabled the stop loss.
This strategy is already configured to run on BTCUSD in a 4h timeframe but you can customize the moving average and the stop loss parameters to suit your needs.
I've worked a lot to write this script so I'm not giving it for free but you can try it for 10 days.
Contact me for more details.
Have fun!
PS: I'm french so please excuse me if I've made some grammar errors ;)
cryptomars 1.0 signal Concussion trend
Description:
1. In the indicator, there is an orange signal that fluctuates linearly. It is a buy signal when it goes from bottom to top. When the signal line remains in the upper position, it indicates a multi-party trend.
2. When it goes from top to bottom, it indicates a sell signal. When the signal line remains below, it indicates a sales trend.
3. Depending on the time level, when the position of the signal line changes, determine whether the current candle is completed or not according to the time level of the chart you selected to determine the signal. For example, if you select a chart level of 5 meters, then when the signal line changes, for example, it will send a sell signal from top to bottom. At this time, please do not rush to sell. You should wait for this 5 meter candlestick to complete. When the candle is over and the next candle is started, if the signal line remains in the top-down form, the sell signal is normal and you can sell it.
Because the position of the signal appears, it is the location of the sale. During the completion of the candlestick , the signal may disappear after disappearing. We only have to wait for a while to get a more stable deal.
4. The alarm setting is very simple. There are two lines in the indicator. One is the orange signal line that fluctuates up and down, and the other is the fixed zero line of “zero”.
We set it in the alarm. When the signal line passes "zero" from the top, the short signal is sent only when the candle map is completed. When the signal line passes "zero" from "up" below, the signal is sent for a long time when the candlestick is completed.
One trick, the appearance of the signal, is that the price runs in one direction for a while, so it appears at or near the bottom. Because, when we have already made a profit in the transaction, we can make a profit in advance, and we do not need to wait for the opposite signal to stop the profit and reduce the risk of profit retracement.
Because in this market, the fluctuations are very large, and the people who compete are also very fierce. What we need to do is to make every transaction as possible, and we are all profitable. If we sell and find that the price is still rising, please don't feel sorry, don't consider eating all the profits.
6. When the signal appears, in most cases, even in the impact trend, it will still run a distance in the direction of the signal, that is, you will profit, so please close the position and make a profit in time. Otherwise, when the price volatility is too small, you miss the profit point, the price starts to run in the opposite direction, and you may change from profit to loss.
BITMEX's trailing stop loss is a great feature, please use it flexibly.
7, if it is a shock trend, please try not to trade.
8. We recommend that you turn on the “cryptomars 3.0” and “cryptomars 2.0” indicators. No matter who signs the trade first, you can trade, which can help you get more profit.
9. Remember, I hope this indicator will be your powerful assistant, but please don't rely on it completely. Learning more trading knowledge and skills is even more important. Therefore, when we consider the profitable position, you can use your trading skills, MACD , KDJ, etc. to assist and profit in a more suitable position.
cryptomars signal short 2.0Description:
1. In the indicator, there is an orange signal that fluctuates linearly. It is a buy signal when it goes from bottom to top. When the signal line remains in the upper position, it indicates a multi-party trend.
2. When it goes from top to bottom, it indicates a sell signal. When the signal line remains below, it indicates a sales trend.
3. Depending on the time level, when the position of the signal line changes, determine whether the current candle is completed or not according to the time level of the chart you selected to determine the signal. For example, if you select a chart level of 5 meters, then when the signal line changes, for example, it will send a sell signal from top to bottom. At this time, please do not rush to sell. You should wait for this 5 meter candlestick to complete. When the candle is over and the next candle is started, if the signal line remains in the top-down form, the sell signal is normal and you can sell it.
Because the position of the signal appears, it is the location of the sale. During the completion of the candlestick , the signal may disappear after disappearing. We only have to wait for a while to get a more stable deal.
4. The alarm setting is very simple. There are two lines in the indicator. One is the orange signal line that fluctuates up and down, and the other is the fixed zero line of “zero”.
We set it in the alarm. When the signal line passes "zero" from the top, the short signal is sent only when the candle map is completed. When the signal line passes "zero" from "up" below, the signal is sent for a long time when the candlestick is completed.
One trick, the appearance of the signal, is that the price runs in one direction for a while, so it appears at or near the bottom. Because, when we have already made a profit in the transaction, we can make a profit in advance, and we do not need to wait for the opposite signal to stop the profit and reduce the risk of profit retracement.
Because in this market, the fluctuations are very large, and the people who compete are also very fierce. What we need to do is to make every transaction as possible, and we are all profitable. If we sell and find that the price is still rising, please don't feel sorry, don't consider eating all the profits.
6. When the signal appears, in most cases, even in the impact trend, it will still run a distance in the direction of the signal, that is, you will profit, so please close the position and make a profit in time. Otherwise, when the price volatility is too small, you miss the profit point, the price starts to run in the opposite direction, and you may change from profit to loss.
BITMEX's trailing stop loss is a great feature, please use it flexibly.
7, if it is a shock trend, please try not to trade.
8. We recommend that you turn on the “cryptomars 3.0” and “cryptomars 1.0” indicators. No matter who signs the trade first, you can trade, which can help you get more profit.
9. Remember, I hope this indicator will be your powerful assistant, but please don't rely on it completely. Learning more trading knowledge and skills is even more important. Therefore, when we consider the profitable position, you can use your trading skills, MACD , KDJ, etc. to assist and profit in a more suitable position.
cryptomars signal 3.0Description:
1. In the indicator, there is an orange signal that fluctuates linearly. It is a buy signal when it goes from bottom to top. When the signal line remains in the upper position, it indicates a multi-party trend.
2. When it goes from top to bottom, it indicates a sell signal. When the signal line remains below, it indicates a sales trend.
3. Depending on the time level, when the position of the signal line changes, determine whether the current candle is completed or not according to the time level of the chart you selected to determine the signal. For example, if you select a chart level of 5 meters, then when the signal line changes, for example, it will send a sell signal from top to bottom. At this time, please do not rush to sell. You should wait for this 5 meter candlestick to complete. When the candle is over and the next candle is started, if the signal line remains in the top-down form, the sell signal is normal and you can sell it.
Because the position of the signal appears, it is the location of the sale. During the completion of the candlestick , the signal may disappear after disappearing. We only have to wait for a while to get a more stable deal.
4. The alarm setting is very simple. There are two lines in the indicator. One is the orange signal line that fluctuates up and down, and the other is the fixed zero line of “zero”.
We set it in the alarm. When the signal line passes "zero" from the top, the short signal is sent only when the candle map is completed. When the signal line passes "zero" from "up" below, the signal is sent for a long time when the candlestick is completed.
One trick, the appearance of the signal, is that the price runs in one direction for a while, so it appears at or near the bottom. Because, when we have already made a profit in the transaction, we can make a profit in advance, and we do not need to wait for the opposite signal to stop the profit and reduce the risk of profit retracement.
Because in this market, the fluctuations are very large, and the people who compete are also very fierce. What we need to do is to make every transaction as possible, and we are all profitable. If we sell and find that the price is still rising, please don't feel sorry, don't consider eating all the profits.
6. When the signal appears, in most cases, even in the impact trend, it will still run a distance in the direction of the signal, that is, you will profit, so please close the position and make a profit in time. Otherwise, when the price volatility is too small, you miss the profit point, the price starts to run in the opposite direction, and you may change from profit to loss.
BITMEX's trailing stop loss is a great feature, please use it flexibly.
7, if it is a shock trend, please try not to trade.
8. We recommend that you turn on the “cryptomars 2.0” and “cryptomars 1.0” indicators. No matter who signs the trade first, you can trade, which can help you get more profit.
9. Remember, I hope this indicator will be your powerful assistant, but please don't rely on it completely. Learning more trading knowledge and skills is even more important. Therefore, when we consider the profitable position, you can use your trading skills, MACD , KDJ, etc. to assist and profit in a more suitable position.
[BoTo] Pump&Dump StrategyThis strategy uses only long positions. It isn't used short positions, it doesn't use marginal trade, it doesn't use a pyramiding.
It is strategy uses only one indicator. Ourselves have constructed the indicator for cryptocurrencies. We called it 'Pump&Dump Ocsilator'. You can read as this indicator works here:
Not usual stop
Strategy uses 2 ways for closing of an unprofitable position. But it is possible to use only one way.
Way 1: if the indicator has distinguished a dump, then the long position needs to be closed when the candle is closed (for an example: to close a position when time 00:00 if you have chosen daily timeframe)
Way 2: the user himself chooses the size in settings of this script. Percent. If the user has chosen 100%, means isn't used absolutely. Because the price will never fall by 100%. If the user has chosen less than 100%, for example 5%, then the long position needs to be closed if the low of a candle was less than this price level of choosed stop-loss. But the position needs to be closed too when the candle is closed.
Strategy
A pump-signal: if the candle green and her body is 3 times more than norm
A dump-signal: on the contrary, if the candle red and her body is 3 times more than norm
For opening of a long position: it is necessary any pump-signal (if the position hasn't been open yet)
For closing of a long position: several ways:
1) Or any dump-signal is necessary
2) Or a stop-loss which was chosen by the user is necessary
Millionare tool1. No lag, proprietary algorithm gives signal when position is triggered.
2. Ideal for ones who have tight stop losses but book profits very soon and miss the BIG move.
3. Works on Intraday/ positional/investment long term
4. Works on INDEX/ EQUITY/ FOREX/ CRYPTO CURRENCY
5. Works in any market all over the world, USA,LONDON, JAPAN,INDIA etc
6. 5d,1m,3m ,6m,1yr,5yr no problem.
7. Ideal for trend traders who want to catch the biggest move
8. All human emotions/temptations, silly indicators are out, get the signal? take the entry. simple as ABC
9.Use a breakeven stop loss or max 0.3%, never have a big loss, only big profits
*BUY on long signal, book profits when content, or on next short signal, can initiate fresh shorts too.
*Works in all markets mentioned
*Its your best friend to catch the trend. money
Some examples-
1) postimg.org
2) postimg.org
3) postimg.org
4) postimg.org
5) postimg.org
MACDouble & StochRSI w/ safeties and variable time interval v0.3UPDATE:
IMPORTANT!!! MAKE SURE "RECALCULATE AFTER ORDER FILLED" IS CHECKED. I will have it on by default in the future.
This is a continuation of my previous scripts of two MACD indicators with a Stochastic RSI indicator.
New features:
- Alternate MACD time interval
You can now set the time interval for the second MACD indicator to a different resolution than the displayed chart.
Uncheck the box and select the desired interval. For example, if your chart is set to 15min then first MACD will be set at 15 min and you can select 5 min for the second MACD.
- Alternate StoRSI time interval
You can (and should) set the StochRSI to a different time interval as well. StochRSI hasn't worked great with previous versions. Now you can set it to a different time resolution as well. I strongly recommend you set it at a higher (slower) resolution; for example if your chart is set at 15min then you should test setting the StochRSI at 30 or 45min.
- ' True" StochRSI logic
Trading logic for StochRSI is now a true StochRSI, instead of just reading "k" and ignoring "d", K now has to be greater than D to buy and less than to sell.
- Safeties
A primitive but low risk safety in the form of an uptrend/downtrend price safety. If current close+high isn't greater than the previous close and high then the buy order will not be executed. The same applies for sell orders.
- Cap on losses from short positions
A stop loss safety set to 9000 for exiting sell positions. This will need refinement in the future but this puts a cap on losses from any sell position. At an initial currency of 10,000 this translates to 90.00. If it is giving you problems simply delete line 78 from the source code.
Please feel free to ask any questions or send me suggestions. This is still very much a work in progress and I'll try to polish up the rough spots but it is fully functional. With a slower StochRSI and the safeties I have gotten it to consistently outperform the old 2x MACD strategy script---typically by 3-fold.
ETH Compounder [crankyprofits]Overview
ETH Compounder is a 15-minute trading strategy built for Ethereum (ETH/USD), combining trend confirmation, momentum shifts, and structured risk management. This strategy is designed to catch trend breakouts with high conviction and compound profits using multiple take-profit levels.
Core Strategy Logic
Trend Direction: Uses Hull Moving Average to determine market bias.
Breakout Entry: Enters on price breakout above/below a Keltner Channel.
Momentum Trigger: Combines MACD and STC-style momentum to validate entry points.
Heikin Ashi Candles: Used internally to smooth price action for cleaner signals.
No Pyramiding: Only one trade at a time to avoid stacking entries during choppy markets.
Profit-Taking System
The strategy features a tiered take-profit system:
TP1: ~2% gain (100% in free version)
TP2–TP4: Additional tiers reserved for premium builds
This approach allows partial exits to lock in gains while letting remaining position ride the trend.
Risk Management
Default stop loss: ~4.75% from entry
Trailing stop based on Keltner channel and trend strength
Alerts included for Buy, Sell, and Close signals
Best Use Case
This script is optimized for ETH/USD on 15m timeframes. Tuned for Binance out of the box. Ideal for traders who want a semi-passive, momentum-based system that avoids constant screen-watching.
Alerts
Custom alerts are available for:
Buy Entry
Sell Entry
Exit Signal (TP or SL)
TP1–TP4 (for granular control)
Disclaimer
This script is for educational purposes only and does not constitute financial advice. Always backtest and use proper risk management before live trading.
Want to unlock premium features & get alerts? Join our Discord: discord.gg
GStrategy Sol 4hThis is a 4-hour chart strategy for cryptocurrency trading, combining RSI-based divergence signals and trend filters. The script identifies bullish and bearish divergences, and executes long and short entries based on RSI levels. It limits holding time per trade, controls risk with stop-loss and take-profit levels, and provides visual markers for entries and exits. The strategy is designed for intraday to swing trading, aiming for consistent small gains with minimal losses.
GStrategy with Long & Short WIF 1hThis is a 4-hour chart strategy for cryptocurrency trading, combining RSI-based divergence signals and trend filters. The script identifies bullish and bearish divergences, and executes long and short entries based on RSI levels. It limits holding time per trade, controls risk with stop-loss and take-profit levels, and provides visual markers for entries and exits. The strategy is designed for intraday to swing trading, aiming for consistent small gains with minimal losses.
GStrategy with Long & Short WIF 1hThis is a 4-hour chart strategy for cryptocurrency trading, combining RSI-based divergence signals and trend filters. The script identifies bullish and bearish divergences, and executes long and short entries based on RSI levels. It limits holding time per trade, controls risk with stop-loss and take-profit levels, and provides visual markers for entries and exits. The strategy is designed for intraday to swing trading, aiming for consistent small gains with minimal losses.
Long Explosive V1The “Long Explosive V1” strategy calculates the percentage change in price from the last closing price of the candlestick, so that if it increases by a certain percentage it goes long, but if it decreases by another percentage it sends an exit order, so that the percentage limits above and below the current price function as inherent stop loss and take profit, with the benefit of taking advantage of the volatility of the bull market.
Entries and exits are always at the market and based on percentage changes in the price. Of course, the default configuration of the strategy considers a position with a 5% risk control, modest initial capital and standard commissions, which helps to obtain realistic results and protect the user from unexpectedly controlled potential losses.
It is again emphasized that it is always advisable to adjust the parameters of the strategy well, so that the risk-reward is well controlled.
Livermore-Seykota Breakout StrategyStrategy Name: Livermore-Seykota Breakout Strategy
Objective: Execute breakout trades inspired by Jesse Livermore, filtered by trend confirmation (Ed Seykota) and risk-managed with ATR (Paul Tudor Jones style).
Entry Conditions:
Long Entry:
Close price breaks above recent pivot high.
Price is above main EMA (EMA50).
EMA20 > EMA200 (uptrend confirmation).
Current volume > 20-period SMA (volume confirmation).
Short Entry:
Close price breaks below recent pivot low.
Price is below main EMA (EMA50).
EMA20 < EMA200 (downtrend confirmation).
Current volume > 20-period SMA.
Exit Conditions:
Stop-loss: ATR × 3 from entry price.
Trailing stop: activated with offset of ATR × 2.
Strengths:
Trend-aligned entries with volume breakout confirmation.
Dynamic ATR-based risk management.
Inspired by principles of three legendary traders.
Strategy Stats [presentTrading]Hello! it's another weekend. This tool is a strategy performance analysis tool. Looking at the TradingView community, it seems few creators focus on this aspect. I've intentionally created a shared version. Welcome to share your idea or question on this.
█ Introduction and How it is Different
Strategy Stats is a comprehensive performance analytics framework designed specifically for trading strategies. Unlike standard strategy backtesting tools that simply show cumulative profits, this analytics suite provides real-time, multi-timeframe statistical analysis of your trading performance.
Multi-timeframe analysis: Automatically tracks performance metrics across the most recent time periods (last 7 days, 30 days, 90 days, 1 year, and 4 years)
Advanced statistical measures: Goes beyond basic metrics to include Information Coefficient (IC) and Sortino Ratio
Real-time feedback: Updates performance statistics with each new trade
Visual analytics: Color-coded performance table provides instant visual feedback on strategy health
Integrated risk management: Implements sophisticated take profit mechanisms with 3-step ATR and percentage-based exits
BTCUSD Performance
The table in the upper right corner is a comprehensive performance dashboard showing trading strategy statistics.
Note: While this presentation uses Vegas SuperTrend as the underlying strategy, this is merely an example. The Stats framework can be applied to any trading strategy. The Vegas SuperTrend implementation is included solely to demonstrate how the analytics module integrates with a trading strategy.
⚠️ Timeframe Limitations
Important: TradingView's backtesting engine has a maximum storage limit of 10,000 bars. When using this strategy stats framework on smaller timeframes such as 1-hour or 2-hour charts, you may encounter errors if your backtesting period is too long.
Recommended Timeframe Usage:
Ideal for: 4H, 6H, 8H, Daily charts and above
May cause errors on: 1H, 2H charts spanning multiple years
Not recommended for: Timeframes below 1H with long history
█ Strategy, How it Works: Detailed Explanation
The Strategy Stats framework consists of three primary components: statistical data collection, performance analysis, and visualization.
🔶 Statistical Data Collection
The system maintains several critical data arrays:
equityHistory: Tracks equity curve over time
tradeHistory: Records profit/loss of each trade
predictionSignals: Stores trade direction signals (1 for long, -1 for short)
actualReturns: Records corresponding actual returns from each trade
For each closed trade, the system captures:
float tradePnL = strategy.closedtrades.profit(tradeIndex)
float tradeReturn = strategy.closedtrades.profit_percent(tradeIndex)
int tradeType = entryPrice < exitPrice ? 1 : -1 // Direction
🔶 Performance Metrics Calculation
The framework calculates several key performance metrics:
Information Coefficient (IC):
The correlation between prediction signals and actual returns, measuring forecast skill.
IC = Correlation(predictionSignals, actualReturns)
Where Correlation is the Pearson correlation coefficient:
Correlation(X,Y) = (nΣXY - ΣXY) / √
Sortino Ratio:
Measures risk-adjusted return focusing only on downside risk:
Sortino = (Avg_Return - Risk_Free_Rate) / Downside_Deviation
Where Downside Deviation is:
Downside_Deviation = √
R_i represents individual returns, T is the target return (typically the risk-free rate), and n is the number of observations.
Maximum Drawdown:
Tracks the largest percentage drop from peak to trough:
DD = (Peak_Equity - Trough_Equity) / Peak_Equity * 100
🔶 Time Period Calculation
The system automatically determines the appropriate number of bars to analyze for each timeframe based on the current chart timeframe:
bars_7d = math.max(1, math.round(7 * barsPerDay))
bars_30d = math.max(1, math.round(30 * barsPerDay))
bars_90d = math.max(1, math.round(90 * barsPerDay))
bars_365d = math.max(1, math.round(365 * barsPerDay))
bars_4y = math.max(1, math.round(365 * 4 * barsPerDay))
Where barsPerDay is calculated based on the chart timeframe:
barsPerDay = timeframe.isintraday ?
24 * 60 / math.max(1, (timeframe.in_seconds() / 60)) :
timeframe.isdaily ? 1 :
timeframe.isweekly ? 1/7 :
timeframe.ismonthly ? 1/30 : 0.01
🔶 Visual Representation
The system presents performance data in a color-coded table with intuitive visual indicators:
Green: Excellent performance
Lime: Good performance
Gray: Neutral performance
Orange: Mediocre performance
Red: Poor performance
█ Trade Direction
The Strategy Stats framework supports three trading directions:
Long Only: Only takes long positions when entry conditions are met
Short Only: Only takes short positions when entry conditions are met
Both: Takes both long and short positions depending on market conditions
█ Usage
To effectively use the Strategy Stats framework:
Apply to existing strategies: Add the performance tracking code to any strategy to gain advanced analytics
Monitor multiple timeframes: Use the multi-timeframe analysis to identify performance trends
Evaluate strategy health: Review IC and Sortino ratios to assess predictive power and risk-adjusted returns
Optimize parameters: Use performance data to refine strategy parameters
Compare strategies: Apply the framework to multiple strategies to identify the most effective approach
For best results, allow the strategy to generate sufficient trade history for meaningful statistical analysis (at least 20-30 trades).
█ Default Settings
The default settings have been carefully calibrated for cryptocurrency markets:
Performance Tracking:
Time periods: 7D, 30D, 90D, 1Y, 4Y
Statistical measures: Return, Win%, MaxDD, IC, Sortino Ratio
IC color thresholds: >0.3 (green), >0.1 (lime), <-0.1 (orange), <-0.3 (red)
Sortino color thresholds: >1.0 (green), >0.5 (lime), <0 (red)
Multi-Step Take Profit:
ATR multipliers: 2.618, 5.0, 10.0
Percentage levels: 3%, 8%, 17%
Short multiplier: 1.5x (makes short take profits more aggressive)
Stop loss: 20%
Hierarchical + K-Means Clustering Strategy===== USER GUIDE =====
Hierarchical + K-Means Clustering Strategy
OVERVIEW:
This strategy combines hierarchical clustering and K-means algorithms to analyze market volatility patterns
and generate trading signals. It uses a modified SuperTrend indicator with ATR-based volatility clustering
to identify potential trend changes and market conditions.
KEY FEATURES:
- Advanced volatility analysis using hierarchical clustering and K-means algorithms
- Modified SuperTrend indicator for trend identification
- Multiple filter options including moving average and ADX trend strength
- Volume-based exit mechanism to protect profits
- Customizable appearance settings
SETTINGS EXPLANATION:
1. SuperTrend Settings:
- ATR Length: Period for ATR calculation (default: 11)
- SuperTrend Factor: Multiplier for ATR to determine trend bands (default: 3)
2. Hierarchical Clustering Settings:
- Training Data Length: Number of bars used for clustering analysis (default: 200)
3. Appearance Settings:
- Transparency 1 & 2: Control the opacity of trend lines and fills
- Bullish/Bearish Color: Colors for uptrend and downtrend visualization
4. Time Settings:
- Start Year/Month: Define when the strategy should start executing trades
5. Filter Settings:
- Moving Average Filter: Uses SMA to filter trades (only enter when price is on correct side of MA)
- Trend Strength Filter: Uses ADX to ensure trades are taken in strong trend conditions
6. Volume Stop Loss Settings:
- Volume Ratio Threshold: Controls sensitivity of volume-based exits
- Monitoring Delay Bars: Number of bars to wait before monitoring volume for exit signals
HOW TO USE:
1. Apply the indicator to your chart
2. Adjust settings according to your trading preferences and timeframe
3. Long signals appear when price crosses above the SuperTrend line (▲k marker)
4. Short signals appear when price crosses below the SuperTrend line (▼k marker)
5. The strategy automatically manages exits based on volume balance conditions
INTERPRETATION:
- Green line/area: Bullish trend - consider long positions
- Red line/area: Bearish trend - consider short positions
- Yellow line: Moving average for additional trend confirmation
- Volume balance exits occur when buying/selling pressure equalizes
RECOMMENDED TIMEFRAMES:
This strategy works best on 1H, 4H, and daily charts for most markets.
For highly volatile assets, shorter timeframes may also be effective.
RISK MANAGEMENT:
Always use proper position sizing and consider setting additional stop losses
beyond the strategy's built-in exit mechanisms.
===== END OF USER GUIDE =====
Arpeet MACDOverview
This strategy is based on the zero-lag version of the MACD (Moving Average Convergence Divergence) indicator, which captures short-term trends by quickly responding to price changes, enabling high-frequency trading. The strategy uses two moving averages with different periods (fast and slow lines) to construct the MACD indicator and introduces a zero-lag algorithm to eliminate the delay between the indicator and the price, improving the timeliness of signals. Additionally, the crossover of the signal line and the MACD line is used as buy and sell signals, and alerts are set up to help traders seize trading opportunities in a timely manner.
Strategy Principle
Calculate the EMA (Exponential Moving Average) or SMA (Simple Moving Average) of the fast line (default 12 periods) and slow line (default 26 periods).
Use the zero-lag algorithm to double-smooth the fast and slow lines, eliminating the delay between the indicator and the price.
The MACD line is formed by the difference between the zero-lag fast line and the zero-lag slow line.
The signal line is formed by the EMA (default 9 periods) or SMA of the MACD line.
The MACD histogram is formed by the difference between the MACD line and the signal line, with blue representing positive values and red representing negative values.
When the MACD line crosses the signal line from below and the crossover point is below the zero axis, a buy signal (blue dot) is generated.
When the MACD line crosses the signal line from above and the crossover point is above the zero axis, a sell signal (red dot) is generated.
The strategy automatically places orders based on the buy and sell signals and triggers corresponding alerts.
Advantage Analysis
The zero-lag algorithm effectively eliminates the delay between the indicator and the price, improving the timeliness and accuracy of signals.
The design of dual moving averages can better capture market trends and adapt to different market environments.
The MACD histogram intuitively reflects the comparison of bullish and bearish forces, assisting in trading decisions.
The automatic order placement and alert functions make it convenient for traders to seize trading opportunities in a timely manner, improving trading efficiency.
Risk Analysis
In volatile markets, frequent crossover signals may lead to overtrading and losses.
Improper parameter settings may cause signal distortion and affect strategy performance.
The strategy relies on historical data for calculations and has poor adaptability to sudden events and black swan events.
Optimization Direction
Introduce trend confirmation indicators, such as ADX, to filter out false signals in volatile markets.
Optimize parameters to find the best combination of fast and slow line periods and signal line periods, improving strategy stability.
Combine other technical indicators or fundamental factors to construct a multi-factor model, improving risk-adjusted returns of the strategy.
Introduce stop-loss and take-profit mechanisms to control single-trade risk.
Summary
The MACD Dual Crossover Zero Lag Trading Strategy achieves high-frequency trading by quickly responding to price changes and capturing short-term trends. The zero-lag algorithm and dual moving average design improve the timeliness and accuracy of signals. The strategy has certain advantages, such as intuitive signals and convenient operation, but also faces risks such as overtrading and parameter sensitivity. In the future, the strategy can be optimized by introducing trend confirmation indicators, parameter optimization, multi-factor models, etc., to improve the robustness and profitability of the strategy.
Liquidity Trading Algorithm (LTA)
The Liquidity Trading Algorithm is an algorithm designed to provide trade signals based on
liquidity conditions in the market. The underlying algorithm is based on the Liquidity
Dependent Price Movement (LDPM) metric and the Liquidity Dependent Price Stability (LDPS)
algorithm.
Together, LDPM and LDPS demonstrate statistically significant forecasting capabilities for price-
action on equities, cryptocurrencies, and futures. LTA takes these liquidity measurements and
translates them into actionable insights by way of entering or exiting a position based
on the future outlooks, as measured by the current liquidity status.
The benefit of LTA is that it can incorporate these powerful liquidity measurements into
actionable insights with several features designed to help you tailor LTA's behavior and
measurements to your desired vantage point. These customizable features come by the way of determining LTA's assessment style, and additional monitoring systems for avoiding bear and bull traps, along with various other quality of life features, discussed in more detail below.
First, a few quick facts:
- LTA is compatible on a wide array of instruments, including Equities, Futures, Cryptocurrencies, and Forex.
- LTA is compatible on most intervals in so long as the data can be calculated appropriately,
(be sure to do a backtest on timescales less than 1-minue to ensure the data can be computed).
- LTA only measures liquidity at the end of the interval of the chart chosen, and does not respond to conditions during the candle interval, unless specified (such as with `Stops`).
- LTA is interval-dependent, this means it will measure and behave differently on different
intervals as the underlying algorithms are dependent on the interval chosen.
- LTA can utilize fractional share sizing for cryptocurrencies.
- LTA can be restricted to either bullish or bearish indications.
- Additional Monitoring Systems are available for additional risk mitigation.
In short, LTA is a widely applicable, unique algorithm designed to translate liquidity measurements into liquidity insights.
Before getting more into the details, here is a quick list of the main features and settings
available for customization:
- Backtesting Start Date: Manual selection of the start date for the algorithm during backtesting.
- Assessment Style: adjust how LDPM and LDPS measure and respond to changes in liquidity.
- Impose Wait: force LTA to wait before entering or exiting a position to ensure conditions have remained conducive.
- Trade Direction Allowance: Restrict LTA to only long or only short, if desired.
- Position Sizing Method: determine how LTA calculates position sizing.
- Fractional Share Sizing: allow LTA to calculate fractional share sizes for cryptocurrencies
- Max Size Limit: Impose a maximum size on LTA's positions.
- Initial Capital: Indicate how much capital LTA should stat with.
- Portfolio Allotment: Indicate to LTA how much (in percentages) of the available balance should be considered when calculating position size.
- Enact Additional Monitoring Systems: Indicate if LTA should impose additional safety criteria when monitoring liquidity.
- Configure Take Profit, Stop-Loss, Trailing Stop Loss
- Display Information tables on the current position, overall strategy performance, along
with a text output showing LTA's processes.
- Real-time text output and updates on LTA's inner workings.
Let's get into some more of the details.
LTA's Assessment Style
LTA's assessment style determines how LTA collects and responds to changing data. In traditional terms, this is akin to (but not quite exactly the same as) the sensitivity versus specificity spectrum, whereby on one end (the sensitive end), an algorithm responds to changes in data in a reactive manner (which tends to lower its specificity, or how often it is correct in its indications), and on the other end, the opposite one, the algorithm foresakes quick changes for longevity of outlook.
While this is in part true, it is not a full view of the underlying mechanisms that changing the assessment style augments. A better analogy would be that the sensitive end of the spectrum (`Aggressive`) is in a state such that the algorithm wants to changing its outlooks, and as such, with changes in data, the algorithm has to be convinced as to why that is not a good idea to change outlooks, whereas the the more specific states (`Conservative`, `Diamond`) must be convinced that their view is no longer valid and that it needs to be changed.
This means the `Aggressive` and the `Diamond` settings fundamentally differ not just in their
data collection, but also in the data processing such that the `Aggressive` decision tree has to
be convinced that the data is the same (as its defualt is that it has changed),
and the `Diamond` decision tree has to be convinced that the data is not the same, and as such, the outlook need changed.
From there, the algorithm cooks through the data and determines to what the outlook should be changed to, given the current state of liquidity.
`Balanced` lies in the middle of this balance, attempting to balance being open to new ideas while not removing the wisdom of the past, as it were.
On a scale of most `sensitive` to most `specific`, it is as follows: `Aggressive`, `Balanced`,
`Conservative`, `Diamond`.
Functionally, these different modes can help in different liquidity environments, as certain
environments are more conducive to an eager approach (such as found near `Aggressive`) or are more conducive to a more conservative approach, where sudden changes in liquidity are known to be short-lived and unremarkable (such as many previously identified bull or bear traps).
For instance, on low interval views, it can often-times be beneficial to keep the algorithm towards the `Sensitive` end, since on the lower-timeframes, the crosswinds can change quite dramatically; whereas on the longer intervals, it may be useful to maintain a more `Specific` algorithm (such as found near `Diamond` mode) setting since longer intervals typically lend themselves to longer time-horizons, which themselves typically lend themselves to "weathering the storm", as it were.
LTA's Assessment Style is also supported by the Additional Monitoring Systems which works
to add sensitivity without sacrificing specificity by enacting a separate monitoring system, as described below.
Additional Monitoring Systems
The Additional Monitoring System (AMS) attempts to add more context to any changes in liquidity conditions as measured, such that LTA as a whole will have an expanded view into any rapidly changing liquidity conditions before these changes manifest in the traditional data streams. The ideal is that this allows for early exits or early entrances to positions "a head of time".
The traditional use of this system is to indicate when liquidity is suggestive of the end of a particular run (be it a bear run or a bull run), so an early exit can be initiated (and thus,
downside averted) even before the data officially showcase such changes. In such cases (when AMS becomes activated), the algorithm will signal to exit any open positions, and will restrict the opening of any new positions.
When a position is exited because of AMS, it is denoted as an `Early Exit` and if a position is prevented from being entered, the text output will display `AM prevented entry...` to indicate that conditions are not meeting AMS' additional standards.
The algorithm will wait to make any actions while `AMS` is `active` and will only enter into a new position once `AMS` has been `deactivated` and overall liquidity conditions are appropriate.
Functionally, the benefits of AMS translate to:
- Toggeling AMS on will typically see a net reduction in overall profitability, but
- AMS will typically (almost always) reduce max drawdown,
an increases in max runup, and increase return-over-maxdrawdown, and
- AMS can provide benefit for equities that experience a lot of "traps" by navigating early
entrance and early exits.
So in short, AMS is way of adding an additional level of liquidity monitoring that attempts to
exit positions if conditions look to be deteriorating, and to enter conditions if they look to be
improving. The cost of this additional monitoring, however, is a greater number of trades indicated, and a lower overall profitability.
Impose Wait
Note: `Impose Wait` will not force Take Profit, Stop Loss, or Trailing Stop Loss to
wait.
LTA can be indicated to `wait` before entering or exiting a position if desired. This means that if conditions change, whereas without a `wait` imposed, the algorithm would immediately indicate this change via a signal to alter the strategy's position, with a `wait` imposed, the algorithm will `wait` the indicated number of bars, and then re-check conditions before proceeding.
If, while waiting, conditions change to a state that is no longer compatible with the "order-in-
waiting", then the order-in-waiting is removed, and the counts reset (i.e.: conditions must remain favorable to the intended positional change throughout the wait period).
Since LTA works at the end-of-intervals, there is an inherently "built-in" wait of 1 bar when
switching directly from long to short (i.e.: if a full switch is indicated, then it is indicated as
conditions change -> exit new position -> wait until -> check conditions ->
enter new position as indicated). Thus, to impose a wait of `1 bar` would be to effectively have a total of two candles' ends prior to the entrance of the new position).
There are two main styles of `Impose Wait` that you can utilize:
- `Wait` : this mode will cause LTA to `wait` when both entering and exiting a position (in so long as it is not an exit signaled via a Take Profit, Stop Loss or Trailing Stop Loss).
- `Exit-Wait` : This mode will >not< cause LTA to `wait` if conditions require the closing of a position, but will force LTA to wait before entering into a position.
Position:
In addition to the availability to restrict LTA to either a long-only or short-only strategy, LTA
also comprises additional flexibility when deciding on how it should navigate the markets with
regards to sizing. Notably, this flexibility benefits several aspects of LTA's existence, namely the ability to determine the `Sizing Method`, or if `Fractional Share Sizing` should be employed, and more, as discussed below.
Position Sizing Method
There are two main ways LTA can determine the size of a position. Either via the `Fixed-Share` choice, or the `Fixed-Percentage` choice.
- `Fixed-Share` will use the amount indicated in the `Max Sizing Limit` field as the position size, always.
Note: With `Fixed-Share` sizing, LTA will >not< check if the balance is sufficient
prior to signaling an entrance.
- `Fixed-Percentage` will use the percentage amount indicated in the `Portfolio Allotment` field as the percentage of available funds to use when calculating the position size. Additionally, with the `Fixed-Percentage` choice, you can set the `Max Sizing Limit` if desired, which will ensure that no position will be entered greater than the amount indicated in the field.
Fractional Share Sizing
If the underlying instrument supports it (typically only cryptocurrencies), share sizing can be
fractionalized. If this is done, the resulting positin size is rounded to `4 digits`. This means any
position with a size less than `0.00005` will be rounded to `0.0000`
Note: Ensure that the underlying instrument supports fractional share sizing prior
to initiating.
Max Sizing Limit
As discussed above, the `Max Sizing Limit` will determine:
- The position size for every position, if `Sizing Method : Fixed-Share` is utilized, or
- The maximum allowed size, regardless of available capital, if `Sizing Method : Fixed-Percentage` is utilized.
Note: There is an internal maximum of 100,000 units.
Initial Capital
Note: There are 2 `Initial Capital` settings; one in LTA's settings and one in the
`Properties` tab. Ensure these two are the same when doing backtesting.
The initial capital field will be used to determine the starting balanace of the strategy, and
is used to calculate the internal data reporting (the data tables).
Portfolio Allotment
You can specify how much of the total available balance should be used when calculating the share size. The default is 100%.
Stops
Note: Stops over-ride `AMS` and `Impose Wait`, and are not restricted to only the
end-of-candle and will occur instantaneously upon their activation. Neither `AMS` nor `Impose Wait` can over-ride a signal from a `Take-Profit`, `Stop-Loss`, or a `Trailing-Stop Loss`.
LTA enhouses three stops that can be configured, a `Take-Profit`, a `Stop-Loss` and a `Trailing-Stop Loss`. The configurations can be set in the settings in percent terms. These exit signals will always over-ride AMS or any other restrictions on position exit.
Their configuration is rather standard; set the percentages you want the signal to be sent at and so it will be done.
Some quick notes on the `Trailing-Stop Loss`:
- The activation percentage must be reached (in profits) prior to the `Traililng-Stop Loss`
from activating the downside protection. For example, if the `Activation Percentage` is 10%, then unless the position reaches (at any point) a 10% profit, then it will not signal any exits on the downside, should it occur.
- The downside price-point is continuously updated and is calculated from the maximum profit reached in the given position and the loss percentage placed in the appropriate field.
Data Tables and Data Output
LTA provides real-time data output through a variety of mechanisms:
- `Position Table`
The `Position Table` displays information about the current position, including:
> Position Duration : how long the position has been open for.
> Indicates if the side is Long or Short, depending on if it is long or short.
> Entry Price: the price the position was entered at.
> Current Price (% Dif): the current price of the underlying and the %-difference between the entry price and the current price.
> Max Profit ($/%): the maximum profit reached in $ and % terms.
> Current PnL ($/%) : the current PnL for the open position.
- `Performance Table`
The `Performance Table` displays information regarding the overall performance of the algorithm since its `Start Date`. These data include:
> Initial Equity ($): The initial equity the algorithm started with.
> Current Equity ($): The current total equity of the account (including open positions)
> Net Profits ($|%) : The overall net profit in $ and % terms.
> Long / Short Trade Counts: The respective trade counts for the positions entered.
> Total Closed Trades: The running sum of the number of trades closed.
> Profitability: The calculation of the number of profitable trades over the total number of
trades.
> Avg. Profit / Trade: The calculation of the average profit per trade in both $ and % terms.
> Avg. Loss / Trade: The calculation of the average loss per trade in both $ and % terms.
> Max Run-Up: The maximum run-up the algorithm has seen in both $ and % terms.
> Max Drawdown: The maximum draw-down the algorithm has seen in both $ and % terms.
> Return-Over-Max-Drawdown: the ratio of the maximum drawdown against the current net profits.
- `Text Output`
LTA will output, if desired, signals to the text output field every time it analysis or performs and action. These messages can include information such as:
"
08:00:00 >> AM Protocol activated ... exiting position ...
08:00:00 >> Exit Order Created for qty: 2, profit: 380 (4.34%)
...
09:30:00 >> Checking conditions ...
09:30:00 >> AM protocol prevented entry ... waiting ...
"
This way, you can keep an eye out on what is happening "under the hood", as it were.
LTA will produce a message at the end of its assessment at the end of each candle interval, as well as when a position is exited due to a `Stop` or due to `AMS` being activated.
Additionally, the `Text Output` includes a initial message, but for space-constraints, this
can be toggled off with the `Blank Text Output` option within LTA's configurations.
For additional information, please refer to the Author's Instructions below.
Trend Following Parabolic Buy Sell Strategy [TradeDots]The Trend Following Parabolic Buy-Sell Strategy leverages the Parabolic SAR in combination with moving average crossovers to deliver buy and sell signals within a trend-following framework.
This strategy synthesizes proven methodologies sourced from various trading tutorials available on platforms such as YouTube and blogs, enabling traders to conduct robust backtesting on their selected trading pairs to assess the strategy's effectiveness.
HOW IT WORKS
This strategy employs four key indicators to orchestrate its trading signals:
1. Trend Alignment: It first assesses the relationship between the price and the predominant trendline to determine the directional stance—taking long positions only when the price trends above the moving average, signaling an upward market trajectory.
2. Momentum Confirmation: Subsequent to trend alignment, the strategy looks for moving average crossovers as a confirmation that the price is gaining momentum in the direction of the intended trades.
3. Signal Finalization: Finally, buy or sell signals are validated using the Parabolic SAR indicator. A long order is validated when the closing price is above the Parabolic SAR dots, and similarly, conditions are reversed for short orders.
4. Risk Management: The strategy institutes a fixed stop-loss at the moving average trendline and a take-profit level determinable by a prefixed risk-reward ratio calculated from the moving average trendline. These parameters are customizable by the users within the strategy settings.
APPLICATION
Designed for assets exhibiting pronounced directional momentum, this strategy aims to capitalize on clear trend movements conducive to achieving set take-profit targets.
As a lagging strategy that waits for multiple confirmatory signals, entry into trades might occasionally lag beyond optimal timing.
Furthermore, in periods of consolidation or sideways movement, the strategy may generate several false signals, suggesting the potential need for additional market condition filters to enhance signal accuracy during volatile phases.
DEFAULT SETUP
Commission: 0.01%
Initial Capital: $10,000
Equity per Trade: 70%
Users are advised to adjust and personalize this trading strategy to better match their individual trading preferences and style.
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.